package com.guchenbo.example.netty4;

import io.netty.channel.DefaultEventLoopGroup;
import io.netty.util.concurrent.EventExecutor;

public class EventLoopDemo {
    public static void main(String[] args) {
        DefaultEventLoopGroup group = new DefaultEventLoopGroup(3);
        System.out.println(group.executorCount());
        for (EventExecutor eventExecutor : group) {
            System.out.println(eventExecutor);
        }
        for (int i = 0; i < 10; i++) {
            group.execute(new HelloTask());
        }
    }
}
